package com.yu.crm.mapper;

import com.yu.crm.domain.pojo.CrmDepartment;
import com.yxzz.common.BaseMapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 部门信息表 Mapper 接口
 * </p>
 *
 * @author donnie-bin
 * @since 2019-06-10
 */

public interface CrmDepartmentMapper extends BaseMapper<CrmDepartment> {

    /**
     * 查询详情
     * @param id
     * @return
     */
    CrmDepartment getById(Serializable id);

    /**
     * 查询树形列表
     * @param pid
     * @return
     */
    List<CrmDepartment> selectTreeList(Long pid);

    //@Param("pid") 解决pid在when语句中无法识别的问题
    //List<CrmDepartmentFeignFallbackFactory> selectTreeList(@Param("pid") Long pid);
}
